package com.bidepan.spring6.prefix;

import com.bidepan.spring6.di.ResourceBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
    public static void main(String[] args) {
        //通过*来加载多个以"bean-demo"为前缀的bean.xml文件
        ApplicationContext context = new ClassPathXmlApplicationContext("bean-demo*.xml");
        DemoPrefix demoPrefix = context.getBean("demoPrefix",DemoPrefix.class);
        demoPrefix.run();
        DemoPrefix2 demoPrefix2 = context.getBean("demoPrefix2",DemoPrefix2.class);
        demoPrefix2.run();
    }
}
